﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class shopping3 : System.Web.UI.Page
{
    public string orderId;
    public string payname;
    public string paytel;
    
    protected void Page_Load(object sender, EventArgs e)
    {   
        if(!IsPostBack)
        {
            var ordernumber = Request["orderID"];
            pay.BLL.OrderBLL orderbll = new pay.BLL.OrderBLL();

            if (ordernumber != null)
            {
                ordernumber = ordernumber.Split(',')[0];
                pay.Entity.Web_Order orders = orderbll.GetOrderByOrderNumber(ordernumber);
                orderId = ordernumber;
                payname = orders.Truename.Trim();
                paytel = orders.Mobile;

            }//完成了支付
            else
            {
  
                if (Session["uname"] == null || Session["tel"]==null)
                {
                    Response.Write("<script>alert('用户姓名或联系电话不能为空!'); this.history.back(-1);</script>");
                    return;
                }
                orderId = "GH" + DateTime.Now.ToString("yyyyMMddHHmmssFFF");
                if (Session["Ordernumber"] != null)
                {
                    orderId = Session["Ordernumber"].ToString();
                }
                
                payname = Session["uname"].ToString();
                string str = Session["tel"].ToString();
                paytel = str.Substring(0, 3) + "****" + str.Substring(7, 4);
               // paytel = Session["tel"].ToString();


            }//未完成支付


         
           
            
        }
        
    }
    



}